package com.auxgroup.bridge.app.inner.vo;

import com.auxgroup.smarthome.appconst.BusinessConstant;
import io.swagger.annotations.ApiModelProperty;

/**
 * Created by root on 17-8-10.
 */
public class DeviceRepairVo {

    @ApiModelProperty(value = "主键")
    private String repairId;

    @ApiModelProperty(value = "mac")
    private String mac;

    @ApiModelProperty(value = "设备sn")
    private String deviceSn;

    @ApiModelProperty(value = "故障类型")
    private String faultType;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "用户手机号")
    private String userPhone;

    @ApiModelProperty(value = "故障状态 ")
    private String faultStatusShow;

    @ApiModelProperty(value = "故障状态 0已解决1未解决")
    private Integer faultStatus;

    @ApiModelProperty(value = "创建时间")
    private Long createdAt;

    public String getRepairId() {
        return repairId;
    }

    public void setRepairId(String repairId) {
        this.repairId = repairId;
    }

    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }

    public String getDeviceSn() {
        return deviceSn;
    }

    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }

    public String getFaultType() {
        return faultType;
    }

    public void setFaultType(String faultType) {
        this.faultType = faultType;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public Integer getFaultStatus() {
        return faultStatus;
    }

    public void setFaultStatus(Integer faultStatus) {
        this.faultStatus = faultStatus;
    }

    public Long getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Long createdAt) {
        this.createdAt = createdAt;
    }

    public String getFaultStatusShow() {
        if(faultStatus == BusinessConstant.FAULT_NOT_RESOLVED.getValue()){
            setFaultStatusShow(BusinessConstant.FAULT_NOT_RESOLVED.getMsg());
        }else if(faultStatus == BusinessConstant.FAULT_RESOLVED.getValue()){
            setFaultStatusShow(BusinessConstant.FAULT_RESOLVED.getMsg());
        }
        return faultStatusShow;
    }

    public void setFaultStatusShow(String faultStatusShow) {
        this.faultStatusShow = faultStatusShow;
    }
}
